﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace BanquetPortion.Models
{
    /// <summary>
    /// 份子钱簿子
    /// </summary>
    [Table("banquetGiftMoneyBook")]
    public class BanquetGiftMoneyBook
    {
        /// <summary>
        /// 数据 ID
        /// </summary>
        [Key]
        [Display(Name = "数据 ID")]
        public int Id { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        [Display(Name = "创建人")]
        public int CreatedBy { get; set; }
        /// <summary>
        /// 创建日期
        /// </summary>
        [Display(Name = "创建日期")]
        public DateTime CreatedDataTime { get; set; } = DateTime.UtcNow.AddHours(8);
        /// <summary>
        /// 酒宴类型 ID
        /// </summary>
        [Display (Name = "酒宴类型")]
        [Required(ErrorMessage ="请选择酒宴类型")]
        public int BanquetType { get; set; }
        /// <summary>
        /// 送还类型 ID
        /// </summary>
        [Display(Name ="送还类型")]
        [Required(ErrorMessage ="请选择送还类型")]
        public int GiveOrGet { get; set; }
        /// <summary>
        /// 份子人 ID
        /// </summary>
        [Display(Name ="份子人 ID")]
        [Required(ErrorMessage ="请输入份子人")]
        public int BanquetGiftPeopleId { get; set; }
        /// <summary>
        /// 金额
        /// </summary>
        [Display(Name ="份子钱金额")]
        [Required(ErrorMessage ="请输入金额")]
        [Column(TypeName ="decimal(18,2)")]
        public decimal Money { get; set; }
        /// <summary>
        /// 份子钱的描述
        /// </summary>
        [Display(Name ="父级 Id")]
        [MaxLength(200,ErrorMessage ="描述最大长度为 200 个字")]
        public string Description { get; set; }
    }
}

